import type { LoginParams, LoginRes, Profile } from "@/types/user"
import { request } from "@/utils/reuqest"

// 登录接口封装
export const loginAPI = (data: LoginParams) => {
  // 返回 Promise
  return request<LoginRes>('/park/login', 'POST', data)
}

/**
 * 获取用户信息
 * @returns 
 */
export const getProfileAPI = () => {
  return request<Profile>('/park/user/profile')
}